<!DOCTYPE html>
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<title></title>
</head>
<body>

<h1> 我的第一段 JavaScript </h1>

<p id="demo">
JavaScript 能改变HTML元素的内容
</p>
<button type="button" onclick="myFunction()">Click Me</button>

<br>

<input id="input" type="text">
<button type="button" onclick="inFunction()">Click</button>

<script type="text/javascript">
function myFunction()
{
	x = document.getElementById("demo");
	x.innerHTML="Hello JavaScript!!!";
}
function inFunction()
{
	x = document.getElementById("input").value;
	if (x == "" || isNaN(x)) {
		alert("Not Numeric");
	}
}
</script>


</body>
</html>
